Section "5.2 - Namespace Defaulting" of the XML Namespaces spec (http://www.w3.org/TR/REC-xml-names) states:
- A default namespace is considered to apply to the element where it is declared (if that element has no namespace prefix), and to all elements with no prefix within the content of that element. If the URI reference in a default namespace declaration is empty, then unprefixed elements in the scope of the declaration are not considered to be in any namespace. Note that default namespaces do not apply directly to attributes
I underlined the last sentence to highlight its significance as the key point here.
So, what does this mean? The database element in your dxl has xmlns='http://www.lotus.com/dxl' as an attribute, and so the database element itself (because it is not explicitly qualified) and all its subelements that are not explicitly qualified or overridden by another xmlns="..." attribute (ie, all elements of the dxl in this case) have names that belong to the "http://www.lotus.com" namespace by default, but none of the attributes belong to that namespace. The attributes, instead, belong to NO namespace, which is often thought of as a namespace with a null string for a name.
For example, the following item element in the dxl ...
- <item name='Title'><text>Title</text></item>
... would be interpreted by a parser as ...
- <dxl:item name='Title'><dxl:text>Title</text></item>
... and specifically NOT as ...
- <dxl:item dxl:name='Title'><dxl:text>Title</text></item>
... because attributes do not inherit namespaces as do elements. So when your stylesheet tries to match "@dxl:name='Title'" for example, it won't find a match because the attribute in the dxl is simply "name" and not "dxl:name".
To fix this, remove the "dxl:" from the parameter expressions in your select statements. Here is the relevant part with appropriate strike-throughs:
<xsl:template match="dxl:document">
<TR>
<TD border="0">
<A>
<xsl:attribute name="href">
<xsl:value-of select="dxl:item[@
</xsl:attribute>
<xsl:value-of select="dxl:item[@
</A>
<xsl:value-of select="dxl:item[@
</TD>
</TR>
</xsl:template>